package com.xgimi.open.skill.datamanager.domain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xgimi.open.skill.datamanager.domain.entity.EntryDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author coderzpw.zhang
 * @description 针对表【entry(词条表)】的数据库操作Mapper
 * @createDate 2023-04-10 19:26:26
 * @Entity com.xgimi.open.skill.datamanager.domain.entity.EntryDO
 */
public interface EntryMapper extends BaseMapper<EntryDO> {

    @Delete("<script>"
            + "delete from entry where word_stock_id in"
            + "<foreach item='wordStockId' index='index' collection='wordStockIds'   open='(' separator=',' close=')'>"
            + "#{wordStockId}"
            + "</foreach>"
            + "</script>")
    Boolean physicalDeleteByWordStockIds(@Param("wordStockIds") List<Long> wordStockIds);
}




